package com.ruoyi.inventory.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.inventory.mapper.WCheckGoodsInfoMapper;
import com.ruoyi.inventory.domain.WCheckGoodsInfo;
import com.ruoyi.inventory.service.IWCheckGoodsInfoService;

/**
 * 盘库作业Service业务层处理
 * 
 * @author wzy
 * @date 2024-08-09 10:38:51
 */
@Service
public class WCheckGoodsInfoServiceImpl implements IWCheckGoodsInfoService 
{
    @Autowired
    private WCheckGoodsInfoMapper wCheckGoodsInfoMapper;

    /**
     * 查询盘库作业
     * 
     * @param checkGoodsId 盘库作业主键
     * @return 盘库作业
     */
    @Override
    public WCheckGoodsInfo selectWCheckGoodsInfoByCheckGoodsId(Long checkGoodsId)
    {
        return wCheckGoodsInfoMapper.selectWCheckGoodsInfoByCheckGoodsId(checkGoodsId);
    }

    /**
     * 查询盘库作业列表
     * 
     * @param wCheckGoodsInfo 盘库作业
     * @return 盘库作业
     */
    @Override
    public List<WCheckGoodsInfo> selectWCheckGoodsInfoList(WCheckGoodsInfo wCheckGoodsInfo)
    {
        return wCheckGoodsInfoMapper.selectWCheckGoodsInfoList(wCheckGoodsInfo);
    }

    /**
     * 新增盘库作业
     * 
     * @param wCheckGoodsInfo 盘库作业
     * @return 结果
     */
    @Override
    public int insertWCheckGoodsInfo(WCheckGoodsInfo wCheckGoodsInfo)
    {
        wCheckGoodsInfo.setCreateTime(DateUtils.getNowDate());
        return wCheckGoodsInfoMapper.insertWCheckGoodsInfo(wCheckGoodsInfo);
    }

    /**
     * 修改盘库作业
     * 
     * @param wCheckGoodsInfo 盘库作业
     * @return 结果
     */
    @Override
    public int updateWCheckGoodsInfo(WCheckGoodsInfo wCheckGoodsInfo)
    {
        wCheckGoodsInfo.setUpdateTime(DateUtils.getNowDate());
        return wCheckGoodsInfoMapper.updateWCheckGoodsInfo(wCheckGoodsInfo);
    }

    /**
     * 批量删除盘库作业
     * 
     * @param checkGoodsIds 需要删除的盘库作业主键
     * @return 结果
     */
    @Override
    public int deleteWCheckGoodsInfoByCheckGoodsIds(Long[] checkGoodsIds)
    {
        return wCheckGoodsInfoMapper.deleteWCheckGoodsInfoByCheckGoodsIds(checkGoodsIds);
    }

    /**
     * 删除盘库作业信息
     * 
     * @param checkGoodsId 盘库作业主键
     * @return 结果
     */
    @Override
    public int deleteWCheckGoodsInfoByCheckGoodsId(Long checkGoodsId)
    {
        return wCheckGoodsInfoMapper.deleteWCheckGoodsInfoByCheckGoodsId(checkGoodsId);
    }
}
